/*
 * @Author: chengsl
 * @Date: 2023-01-10 14:52:27
 * @LastEditors: chengsl
 * @LastEditTime: 2023-01-10 14:52:29
 * @Description: 柱状图-渐变色 widgetGradientColorBarchart
 */
export default {
  title: {
    text: '',
    show: true,
    left: 'center',
    textStyle: { color: '#fff', fontSize: 22, fontWeight: 'normal' },
    subtext: '',
    subtextStyle: { color: '#fff', fontWeight: 'normal', fontSize: 20 }
  },
  tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
  grid: { left: 10, right: 40, bottom: 10, top: 50, containLabel: true },
  legend: { textStyle: { color: '#fff' } },
  xAxis: {
    type: 'category',
    show: true,
    name: '',
    nameTextStyle: { color: '#fff', fontSize: 14 },
    nameRotate: 0,
    axisLabel: {
      show: true,
      interval: 0,
      rotate: 0,
      textStyle: { color: '#fff', fontSize: 14 }
    },
    axisLine: { show: true, lineStyle: { color: 'rgba(32,45,92,0.5)' } },
    axisTick: { show: false },
    splitLine: { show: false, lineStyle: { color: 'rgba(32,45,92,0.5)' } },
    data: ['苹果', '三星', '小米', 'oppo', 'vivo']
  },
  yAxis: {
    type: 'value',
    scale: false,
    splitNumber: 0,
    show: true,
    name: '',
    nameTextStyle: { color: '#fff', fontSize: 14 },
    inverse: false,
    axisLabel: {
      show: true,
      rotate: 0,
      textStyle: { color: '#fff', fontSize: 14 }
    },
    axisLine: { show: true, lineStyle: { color: 'rgba(32,45,92,0.5)' } },
    splitLine: { show: false, lineStyle: { color: 'rgba(32,45,92,0.5)' } },
    splitArea: {
      show: true,
      areaStyle: { color: ['rgba(32,45,92,0.1)', 'rgba(32,45,92,0.5)'] }
    },
    data: []
  },
  series: [
    {
      type: 'bar',
      data: [1000, 2229, 3879, 2379, 4079],
      barWidth: 30,
      itemStyle: {
        normal: {
          color: {
            colorStops: [
              { offset: 0, color: '#3BD6FF' },
              { offset: 1, color: '#0060FF' }
            ],
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            type: 'linear',
            global: false
          },
          barBorderRadius: 0,
          shadowColor: '#948BEA',
          shadowBlur: 4
        }
      },
      label: {
        show: false,
        position: 'top',
        distance: 5,
        fontSize: 14,
        color: '#fff',
        fontWeight: 'normal'
      }
    }
  ]
}
